@import "../../pretixbase/scss/_variables.scss";
@import "../../bootstrap/scss/_bootstrap.scss";
@import "../../fontawesome/scss/font-awesome.scss";
@import "../../pretixbase/scss/_theme.scss";
@import "../../typeahead/typeahead.scss";
@import "../../charts/morris.scss";
@import "../../datetimepicker/_bootstrap-datetimepicker.scss";
@import "_sb-admin-2.scss";
@import "_forms.scss";
@import "_flags.scss";
@import "_orders.scss";
@import "_dashboard.scss";
@import "../../pretixbase/scss/webfont.scss";
@import "../../fileupload/jquery.fileupload.scss";
@import "../../leaflet/leaflet.scss";
@import "../../select2/select2.scss";
@import "../../select2/select2_bootstrap.scss";
@import "../../colorpicker/bootstrap-colorpicker.scss";
@import "../../eventyay-common/scss/_voucher.scss";
@import "../../eventyay-common/scss/custom.scss";

/* See https://github.com/pretix/pretix/pull/761 */
.bootstrap-datetimepicker-widget table td span {
    line-height: 1.8em;
}

footer {
    text-align: center;
    padding: 10px 0;
    font-size: 11px;
}

nav.navbar {
    margin: 0;
}
.navbar-brand img {
    height: 100%;
    width: auto;
    display: inline;
}

#side-menu img.fa-img {
    height: auto;
    width: 1.28571em;
}

nav.navbar .danger, nav.navbar .danger:hover, nav.navbar .danger:active {
    background: $brand-danger !important;
}

.navbar-header .navbar-events {
    color: white;
    padding-top: 6px;
    padding-bottom: 6px;
}
.nav-pills {
    margin-bottom: 10px;
}

#button-shop, #button-sudo {
    padding: 15px;
    min-height: 50px;
    border: none;
    &:hover, &:active {
        text-decoration: none;
    }
}

.product-row {
    padding: 10px 0;

    .count form {
        display: inline;
    }
    .price, .count {
        text-align: right;
    }
    .price small,
    .availability-box small {
        display: block;
        line-height: 1;
    }

    &.total {
        border-top: 1px solid $table-border-color;
    }

    dl {
        padding-left: 20px;
        margin-bottom: 0;

        dd {
            padding-left: 20px;
        }
    }

    .addon-signifier {
        display: inline-block;
        padding-left: 10px;
        font-weight: bold;
    }
}

h1 .btn-sm {
    margin-top: -5px;
}

.btn-toolbar {
    margin-bottom: 20px;
}
.container-fluid > .alert:first-child {
    margin-top: 20px;
}

.flipped-scroll-wrapper {
    overflow-y: auto;
}
.flipped-scroll-wrapper, .flipped-scroll-inner {
    /* This nasty hack puts the scroll bar at the top, so the user really
       notices that there is one */
    transform: rotateX(180deg);
    -ms-transform: rotateX(180deg); /* IE 9 */
    -webkit-transform: rotateX(180deg); /* Safari and Chrome */
}
@media (max-width: $screen-sm-max) {
    .navbar-nav {
        margin-left: 0;
    }
}

.organizer-tabs .tab-inner {
    padding-top: 20px;
}

p.bigger {
    font-size: 16px;
}

.helper-display-block {
    display: block !important;
}
.helper-display-inline {
    display: inline !important;
}
.helper-display-none-soft {
    display: none;
}
.helper-display-none {
    display: none !important;
}
.helper-width-auto {
    width: auto;
}
.helper-width-100 {
    width: 100%;
}
.helper-space-below {
    margin-bottom: 10px;
}

.section-moved {
    margin: 20px 0;
    text-align: center;

    p {
        font-size: 18px;
        margin: 20px auto;
        max-width: 800px;
    }

    .img-moved {
        height: 200px;
        width: auto;
    }
}
.empty-collection {
    margin: 20px 0;
    text-align: center;

    p {
        font-size: 24px;
    }

    .big-grey-icon {
        font-size: 200px;
        color: #ccc;
    }
}
.table .progress {
    margin-bottom: 0;
}

@for $i from 0 through 100 {
  .progress-bar-#{$i} { width: 1% * $i; }
}

.form-order-change .radio {
    display: block;
}
.form-order-change .form-group {
    margin: 0;
}

.multi-step-tutorial {
    &> li {
        margin-bottom: 15px;
    }
}

body.loading #wrapper {
    -webkit-filter: blur(2px);
    -moz-filter: blur(2px);
    -ms-filter: blur(2px);
    -o-filter: blur(2px);
    filter: blur(2px);
}

#loadingmodal, #ajaxerr {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, .7);
    opacity: 0;
    z-index: 20;
    visibility: hidden;
    padding: 10px;

    .big-icon {
        margin-top: 50px;
        font-size: 200px;
        color: $brand-primary;
    }

    .modal-card {
        margin: 50px auto 0;
        top: 50px;
        width: 90%;
        max-width: 600px;
        background: white;
        border-radius: $border-radius-large;
        box-shadow: 0 7px 14px 0 rgba(78, 50, 92, 0.1),0 3px 6px 0 rgba(0,0,0,.07);
        padding: 20px;
        min-height: 160px;

        .modal-card-icon {
            float: left;
            width: 150px;
            text-align: center;

            .big-rotating-icon {
                font-size: 120px;
                margin: 0;
            }
        }
        .modal-card-content {
            margin-left: 160px;
            text-align: left;
            h3 {
                margin-top: 0;
            }
        }
    }
}
@media (max-width: 700px) {
    #loadingmodal, #ajaxerr {
        .modal-card {
            .modal-card-icon {
                float: none;
                width: 100%;
            }
            .modal-card-content {
                text-align: center;
                margin-left: 0;
                margin-right: 0;
                margin-top: 10px;
            }
        }
    }
}

#ajaxerr {
    background: rgba(236, 236, 236, .9);
}

.loading #loadingmodal, .ajaxerr #ajaxerr {
    opacity: 1;
    visibility: visible;
    transition: opacity .5s ease-in-out;
    -moz-transition: opacity .5s ease-in-out;
    -webkit-transition: opacity .5s ease-in-out;
}

.big-rotating-icon {
    margin-top: 50px;
    -webkit-animation: fa-spin 8s infinite linear;
    animation: fa-spin 8s infinite linear;
    font-size: 200px;
    color: $brand-primary;
}

.user-admin-icon {
    width: 16px;
    height: 16px;
    margin-top: -2px;
}

.meta .user-admin-icon {
    width: 12px;
    height: 12px;
    margin-top: -2px;
}

.btn .fa {
    @extend .fa-fw;
}

.action-col-2 {
    min-width: 95px;
}

.fa-danger {
    color: $brand-danger;
}

.nearly-gone {
    overflow: visible !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.colorpicker-2x .colorpicker-saturation {
    width: 200px;
    height: 200px;
}

.colorpicker-2x .colorpicker-hue,
.colorpicker-2x .colorpicker-alpha {
    width: 30px;
    height: 200px;
}

.colorpicker-2x .colorpicker-color,
.colorpicker-2x .colorpicker-color div {
    height: 30px;
}


.dropdown-menu .form-box {
    padding: 3px 10px;
}
.event-dropdown {
    width: 251px;
}
@media (max-width: $screen-xs-max) {
    .event-dropdown {
        width: 100%;
    }
}
.event-dropdown, .mobile-event-dropdown, .select2-results {
    .event-name-full, .primary {
        display: block;
    }
    .event-daterange, .event-organizer, .secondary {
        display: block;
        font-size: $font-size-small;
        color: $text-muted;
    }
    .active .event-daterange, .active .event-organizer, .active a,
    .select2-results__option--highlighted .event-daterange,
    .select2-results__option--highlighted .secondary,
    .select2-results__option--highlighted .event-organizer {
        color: white;
    }
    .active {
        background: $brand-primary;
        color: white;
    }
    span.event-name-full, span.event-daterange, span.event-organizer, span.secondary {
        width: 100%;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }
}

.sidebar-content {
    text-align: center;
    padding: 10px 0;
    font-size: 12px;

    img {
        max-width: 80%;
    }
}

.mobile-navbar-view-form {
    float: right;
    button {
        position: relative;
        margin-right: 15px;
        padding: 6px 10px;
        margin-top: 8px;
        margin-bottom: 8px;
        background-color: transparent;
        background-image: none;
        border: 1px solid transparent;
        border-radius: 4px;
    }
}
.mobile-navbar-view-link {
    padding: 6px 10px;
    color: white !important;
}

@media (min-width: $screen-md-min) {
    .row-plugins {
        display: flex;
        flex-wrap: wrap;
    }

    .row-plugins > [class*=col] {
        display: flex;
        flex-direction: column;
    }

    .row-plugins > [class*=col] > .panel {
        height: 100%
    }
}

.dl-horizontal dt  {
    white-space: normal;
}
td > .dl-horizontal {
    margin-bottom: 0;
}

.collapse-indicator {
    -webkit-transition: all 150ms ease-in 0s;
    transition: all 150ms ease-in 0s;
}

.panel-title a:not(.collapsed) .collapse-indicator {
    -webkit-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    transform: rotate(180deg);
}

.panel-title a[data-toggle="collapse"], details h3.panel-title, details h4.panel-title {
    display: flex;
    padding: 10px 15px;
    margin: -10px -15px;
    align-items: center;
    justify-content: space-between;
    outline: 0;
    text-decoration: none;
}

.panel-title a[data-toggle="collapse"]:hover {
    background-color: #eeeeee;
}

.panel-body {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.fa.disabled {
    color: $text-muted;
}

.event-name-col {
    width: 30%;
}

.impersonate-warning {
    background-color: #ffe761;
    background-image: -webkit-linear-gradient(-45deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
    background-image: -moz-linear-gradient(-45deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
    background-image: linear-gradient(135deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
    padding: 15px;
}

@media(min-width:768px) {
    .impersonate-warning {
        position: inherit;
        margin: 0 0 0 250px;
        padding: 15px 30px;
    }
}

.quotabox {
    display: inline-block;
    vertical-align: top;
    width: 50px;
    .progress {
        height: 7px;
        margin-bottom: 2px;
    }
    .numbers {
        font-size: 10px;
        color: $text-muted;
        display: block;
        text-align: center;
    }
    &.availability .progress-bar-success {
        background: lighten($brand-success, 20%);
    }
}
.quotabox-more {
    font-weight: bold;
    display: inline-block;
    vertical-align: top;
    line-height: 20px;
    margin-top: -6px;
    &:hover {
        text-decoration: none;
    }
}
.quick-setup-step {
    clear: both;
    .quick-icon {
        float: left;
        width: 100px;

        .fa-ticket, .fa-check-circle {
            margin-top: -20px;
        }
        .fa-wrench {
            margin-top: -30px;
        }
        .fa-money, .fa-envelope {
            margin-top: -40px;
        }
    }
    .quick-icon .fa {
        font-size: 100px;
        line-height: 170px;
        display: block;
    }
    .quick-content {
        margin-left: 160px;
        padding-top: 5px;
        overflow: hidden;
    }
}
.thank-you {
    margin-bottom: 25px;

    .fa {
        font-size: 150px;
        line-height: 170px;
        display: block;
        color: $brand-success;
    }

    h2 {
        color: $brand-success;
    }
}
@media (min-width: $screen-md-min) {
    .thank-you {
        min-height: 170px;
        width: 70%;
        margin: auto;

        .fa {
            float: left;
            margin-right: 30px;
        }

        h2 {
            padding-top: 25px;
        }

        p {
            margin-left: 158px;
        }
    }
}
@media (max-width: $screen-md-max) {
    .quick-setup-step {
        .quick-icon {
            display: none;
        }
        .quick-content {
            margin-left: 0;
        }
    }
}
@media (max-width: $screen-sm-max) {
    .thank-you {
        text-align: center;
    }
    h2 {
        margin-top: 0;
    }
}
.iconcol {
    width: 1.28571em;
}

ul.pagination {
    margin-bottom: 0;
}
.pagination-container {
    margin-bottom: 20px;
}

.table-payment-providers > tbody > tr > td {
    vertical-align: middle;
}


details {
    list-style: none;
}
details > summary::-webkit-details-marker {
    display: none;
}

details summary {
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}
.nojs details[open] .collapse-indicator, details.details-open .collapse-indicator {
    -webkit-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    transform: rotate(180deg);
}
.position-buttons {
    padding-left: 20px;
}

.pos-canceled * {
    color: $brand-danger;
    text-decoration: line-through !important;
}

h1 .label {
    display: inline-block;
}

.qr-code-overlay {
    display: none;
    position: absolute;
    padding: 30px;
    background: white;
    text-align: center;
    border-radius: $border-radius-small;
    box-shadow: 0 7px 14px 0 rgba(78, 50, 92, 0.1),0 3px 6px 0 rgba(0,0,0,.07);
}

.timeline {
    .col-date {
        position: relative;
        min-height: 1px;
        padding-left: 15px;
        width: 120px;
        float: left;
    }
    .col-event {
        position: relative;
        min-height: 1px;
        padding-right: 15px;
        margin-left: 120px;
    }
}

.answer-thumb img {
    width: auto;
    height: auto;
    max-height: 100px;
    max-width: 100%;
    margin-top: 5px;
}

.pretixscan-migration {
    h2 {
        margin-top: 0;
    }
    img {
        width: 64px;
        margin-bottom: 5px;
    }
}
.popover{
    padding: 0;
}
.popover-content {
    position: relative;
    padding: 5px 0;
    min-width: 200px;
    #submenu {
        position: absolute;
        top: 0;
        right: 100%;  
        font-size: 16px;
        font-weight: normal;
        cursor: pointer;
        display: none;
        min-width: 200px;
        padding: 5px 0;
        border-radius: 4px;
        z-index: 20;
        background-clip: padding-box;
        border: 1px solid rgba(0, 0, 0, 0.2);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        transition: opacity 0.2s ease-in-out;
    }
    .profile-menu {
        color: darken($btn-primary-bg, 10%);
        font-size: 16px;
        font-weight: normal;
        cursor: pointer;
        a {
            color: darken($btn-primary-bg, 10%) !important;
        }
        .dashboard-item {
            color: darken($btn-primary-bg, 10%);
        }
        i {
            margin-right: 10px;
            width: 16px;
            text-align: center;
        }
        &.separator {
            height: 1px;
            background-color: #e5e5e5;
            margin: 5px 0;
            padding: 0;
        }
    }
    .profile-menu:hover {
        color: #fff;
        background-color: darken($btn-primary-bg, 10%) !important;
        a {
            color: #fff !important;
        }
    }
    .dashboard-item {
        color: darken($btn-primary-bg, 10%);
        font-size: 16px;
        font-weight: normal;
        cursor: pointer;
        i {
            margin-right: 10px;
            width: 16px;
            text-align: center;
        }
        .dashboard-content {
            min-height: 50px;
            padding: 15px;
        }
        #submenu {
            display: none;

            .submenu-item {
                background-color: #fff;

                a {
                    color: darken($btn-primary-bg, 10%) !important;
                }

                &:hover {
                    background-color: darken($btn-primary-bg, 10%) !important;

                    a {
                        color: #fff !important;
                    }
                }
            }
        }
        &:hover {
            #submenu {
                display: block;

                .submenu-item {
                    background-color: #fff;

                    a {
                        color: darken($btn-primary-bg, 10%) !important;
                    }

                    &:hover {
                        background-color: darken($btn-primary-bg, 10%) !important;

                        a {
                            color: #fff !important;
                        }
                    }
                }
            }
        }
    }
    .dashboard-item:hover {
        color: #fff !important;
        background-color: darken($btn-primary-bg, 10%) !important;
    }
    .dashboard-content:hover {
        color: #fff !important;
        background-color: darken($btn-primary-bg, 10%) !important;
    }
}

@media(max-width: $screen-sm-max) {
    .timeline {
        .col-date {
            width: 100%;
            float: none;
        }
        .col-event {
            margin-left: 0;
            padding-left: 15px;
        }
    }
}

.withoutjs {
    display: none !important;
}
.nojs .withoutjs {
    display: block !important;
}

.nojs .requirejs {
    display: none !important;
}

@import "../../pretixbase/scss/_rtl.scss";
@import "../../bootstrap/scss/_rtl.scss";
@import "_rtl.scss";


.dashboard-item {
    cursor: pointer;
    
    #submenu {
        display: none;
    }
    
    
    &:hover {
        #submenu {
            display: block;
        }
    }
    
  
    &.desktop-menu-open {
        
    }
    
   
    &.desktop-submenu-open {
        #submenu {
            display: block;
        }
    }
    
  
    &.menu-open {
        #submenu {
            display: block;
        }
    }
    
    &[tabindex] {
        outline: none;
    }
}


@media (max-width: $screen-md-max) {
    .dashboard-item {
        min-height: 44px;
        
        &:active {
            background-color: darken($btn-primary-bg, 5%) !important;
        }
        
        &.menu-open {
          
            &::after {
                display: none;
                content: '';
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.3);
                z-index: 20;
            }
        }
        
        #submenu {
           
            position: absolute;
            top: 100%; 
            left: 0;
            right: auto;
            width: 100%; 
            max-width: 300px;
            z-index: 10;
            background: white;
            border-radius: 4px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            
            // Add smooth animation
            transform: translateY(-10px);
            opacity: 0;
            transition: all 0.2s ease-in-out;
            
            .submenu-item {
                width: 100%;
                display: flex;
                align-items: center;
                
                a {
                    display: flex;
                    align-items: center;
                    justify-content: flex-start;
                    width: 100%;
                    padding: 12px 16px;
                    text-decoration: none;
                    border-bottom: 1px solid #f0f0f0;
                    text-align: left;
                    
                    i {
                        margin-right: 8px;
                        width: 16px;
                        text-align: center;
                        flex-shrink: 0;
                    }
                    
                    &:last-child {
                        border-bottom: none;
                    }
                }
            }
            
            
            &.show {
                transform: translateY(0);
                opacity: 1;
            }
        }
        
       
        &.menu-open #submenu {
            display: block;
            transform: translateY(0);
            opacity: 1;
        }
    }
}
